ratings-dev-test-results.html

Report generated on 10-Sep-2024 at 12:06:40 by pytest-html v3.1.1

Summary

36 tests ran in 721.33 seconds.

28 passed, 0 skipped, 8 failed, 0 errors, 0 expected failures, 0 unexpected passes, 0 rerun

Results

Result Test Duration Links
Failed tests/frontend/test_ratings.py::test_throttled_request_update_rating_spam[Desktop] 18.45
selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="9ed8a2b9-0598-4833-a788-943506dd14ea")>, base_url = 'https://addons-dev.allizom.org'
variables = {'4mb_addon_slug': '4mb_addon_slug', 'addon_detail_guid': '{f2cd2fe0-0c62-40bd-8e28-2f4d7fc0ad43}', 'addon_detail_id':...dd-ons must comply with Mozilla’s Add-on Policies and are subject to manual review at any time after submission.', ...}

@pytest.mark.serial
@pytest.mark.nondestructive
def test_throttled_request_update_rating_spam(selenium, base_url, variables):
# this test checks that repeatedly modifying the rating score will raise throttled request error
extension = variables["detail_extension_slug"]
selenium.get(f"{base_url}/addon/{extension}")
addon = Detail(selenium, base_url).wait_for_page_to_load()
addon.login("regular_user")
# click ten times on rating star
for i in range(10):
> addon.ratings.rating_stars[3].click()

tests/frontend/test_ratings.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/desktop/frontend/details.py:996: in rating_stars
self.wait.until(
venv/lib/python3.11/site-packages/selenium/webdriver/support/wait.py:81: in until
value = method(self._driver)
venv/lib/python3.11/site-packages/selenium/webdriver/support/expected_conditions.py:314: in _predicate
if target and target.is_enabled():
venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py:186: in is_enabled
return self._execute(Command.IS_ELEMENT_ENABLED)['value']
venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py:396: in _execute
return self._parent.execute(command, params)
venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:429: in execute
self.error_handler.check_response(response)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x103ed9390>
response = {'status': 404, 'value': '{"value":{"error":"stale element reference","message":"The element with the reference 12e56f...sys.mjs:293:10\\nreceiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:73:30\\n"}}'}

def check_response(self, response: Dict[str, Any]) -> None:
"""
Checks that a JSON response from the WebDriver does not have an error.

:Args:
- response - The JSON response from the WebDriver server as a dictionary
object.

:Raises: If the response contains an error message.
"""
status = response.get('status', None)
if not status or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen: str = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, str):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if not status:
status = value.get("status", ErrorCode.UNKNOWN_ERROR)
message = value.get("value") or value.get("message")
if not isinstance(message, str):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass

exception_class: Type[WebDriverException]
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_SHADOW_ROOT:
exception_class = NoSuchShadowRootException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if not value:
value = response['value']
if isinstance(value, str):
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']

screen = None # type: ignore[assignment]
if 'screen' in value:
screen = value['screen']

stacktrace = None
st_value = value.get('stackTrace') or value.get('stacktrace')
if st_value:
if isinstance(st_value, str):
stacktrace = st_value.split('\n')
else:
stacktrace = []
try:
for frame in st_value:
line = frame.get("lineNumber", "")
file = frame.get("fileName", "<anonymous>")
if line:
file = f"{file}:{line}"
meth = frame.get('methodName', '<anonymous>')
if 'className' in frame:
meth = "{}.{}".format(frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == UnexpectedAlertPresentException:
alert_text = None
if 'data' in value:
alert_text = value['data'].get('text')
elif 'alert' in value:
alert_text = value['alert'].get('text')
raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.StaleElementReferenceException: Message: The element with the reference 12e56f12-0ba9-40d5-8f75-d57b67d0572b is stale; either its node document is not the active document, or it is no longer connected to the DOM
E Stacktrace:
E RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
E WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
E StaleElementReferenceError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:725:5
E getKnownElement@chrome://remote/content/marionette/json.sys.mjs:401:11
E deserializeJSON@chrome://remote/content/marionette/json.sys.mjs:259:20
E cloneObject@chrome://remote/content/marionette/json.sys.mjs:59:24
E deserializeJSON@chrome://remote/content/marionette/json.sys.mjs:289:16
E json.deserialize@chrome://remote/content/marionette/json.sys.mjs:293:10
E receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:73:30

venv/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py:243: StaleElementReferenceException
------------------------------Captured stdout call------------------------------
The "click continue button" event occurred.
Failed tests/frontend/test_ratings.py::test_delete_review_tc_id_c4421[Desktop] 79.39
selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="ed255d25-5570-498a-8d40-b3bcaeadd874")>, base_url = 'https://addons-dev.allizom.org'
variables = {'4mb_addon_slug': '4mb_addon_slug', 'addon_detail_guid': '{f2cd2fe0-0c62-40bd-8e28-2f4d7fc0ad43}', 'addon_detail_id':...dd-ons must comply with Mozilla’s Add-on Policies and are subject to manual review at any time after submission.', ...}

@pytest.mark.sanity
@pytest.mark.serial
@pytest.mark.nondestructive
def test_delete_review_tc_id_c4421(selenium, base_url, variables):
extension = variables["detail_extension_slug"]
selenium.get(f"{base_url}/addon/{extension}")
addon = Detail(selenium, base_url).wait_for_page_to_load()
> addon.login("rating_user")

tests/frontend/test_ratings.py:150:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/desktop/base.py:91: in login
fxa.account(user)
pages/desktop/frontend/login.py:101: in account
self.fxa_login(
pages/desktop/frontend/login.py:206: in fxa_login
self.wait.until(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selenium.webdriver.support.wait.WebDriverWait (session="ed255d25-5570-498a-8d40-b3bcaeadd874")>, method = <function url_contains.<locals>._predicate at 0x103c40ea0>
message = 'AMO could not be loaded in https://accounts.stage.mozaws.net/signin_totp_code?showReactApp=true&deviceId=b6e5e449561a...e=offline&email=aschek%2Bqa-rating%40mozilla.com&hasLinkedAccount=false&hasPassword=true. Response status code was 200'

def until(self, method, message: str = ""):
"""Calls the method provided with the driver as an argument until the \
return value does not evaluate to ``False``.

:param method: callable(WebDriver)
:param message: optional message for :exc:`TimeoutException`
:returns: the result of the last call to `method`
:raises: :exc:`selenium.common.exceptions.TimeoutException` if timeout occurs
"""
screen = None
stacktrace = None

end_time = time.monotonic() + self._timeout
while True:
try:
value = method(self._driver)
if value:
return value
except self._ignored_exceptions as exc:
screen = getattr(exc, 'screen', None)
stacktrace = getattr(exc, 'stacktrace', None)
time.sleep(self._poll)
if time.monotonic() > end_time:
break
> raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message: AMO could not be loaded in https://accounts.stage.mozaws.net/signin_totp_code?showReactApp=true&deviceId=b6e5e449561a43d29e2c1cfd3b4ff186&flowBeginTime=1725958612962&flowId=132180a1e0083f43e1ad6fa128d8e3fb1aeee2dd81ea188ac393d8acd4a3f8d2&client_id=285dd6fd9907a74c&scope=profile%2Bopenid&state=82d0ec62f4716336b367a68e1426a1f43ddf127fc0c5fe6ab0cb219d7cca2649%3AL2VuLVVTL2ZpcmVmb3gvYWRkb24vYXdlc29tZS1zY3JlZW5zaG90LXBsdXMtLw&access_type=offline&email=aschek%2Bqa-rating%40mozilla.com&hasLinkedAccount=false&hasPassword=true. Response status code was 200

venv/lib/python3.11/site-packages/selenium/webdriver/support/wait.py:90: TimeoutException
------------------------------Captured stdout call------------------------------
The "click continue button" event occurred.
Failed tests/frontend/test_ratings.py::test_rating_without_text_tc_id_c95947[Desktop] 53.48
selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="b5c04ee6-245c-4e47-8556-a034f08c5bd1")>, base_url = 'https://addons-dev.allizom.org'
variables = {'4mb_addon_slug': '4mb_addon_slug', 'addon_detail_guid': '{f2cd2fe0-0c62-40bd-8e28-2f4d7fc0ad43}', 'addon_detail_id':...dd-ons must comply with Mozilla’s Add-on Policies and are subject to manual review at any time after submission.', ...}

@pytest.mark.serial
@pytest.mark.nondestructive
@pytest.mark.login("rating_user")
def test_rating_without_text_tc_id_c95947(selenium, base_url, variables):
extension = variables["detail_extension_slug"]
selenium.get(f"{base_url}/addon/{extension}")
addon = Detail(selenium, base_url).wait_for_page_to_load()
# addon.login('rating_user')
# total number of reviews in stats card before leaving a new rating
prior_rating_count = addon.stats.stats_reviews_count
# number of ratings with a score of 5 stars before leaving a new rating
prior_bar_rating_count = int(addon.stats.bar_rating_counts[0].text)
# post a 5 star rating score and check that 5 stars are highlighted
addon.ratings.rating_stars[4].click()
> assert "rating" in addon.ratings.delete_rating_link.text
E assert 'rating' in 'Delete review'
E + where 'Delete review' = <selenium.webdriver.remote.webelement.WebElement (session="b5c04ee6-245c-4e47-8556-a034f08c5bd1", element="044342f5-f5d8-4918-8e85-f3a8211e523f")>.text
E + where <selenium.webdriver.remote.webelement.WebElement (session="b5c04ee6-245c-4e47-8556-a034f08c5bd1", element="044342f5-f5d8-4918-8e85-f3a8211e523f")> = <pages.desktop.frontend.details.Detail.Ratings object at 0x103f2b7d0>.delete_rating_link
E + where <pages.desktop.frontend.details.Detail.Ratings object at 0x103f2b7d0> = <pages.desktop.frontend.details.Detail object at 0x1042dae10>.ratings

tests/frontend/test_ratings.py:175: AssertionError
-----------------------------Captured stdout setup------------------------------
The "click continue button" event occurred.
Failed tests/frontend/test_ratings.py::test_delete_rating[Desktop] 7.73
selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="a3c2bef2-1b5a-4664-82ed-9ace0833182e")>, base_url = 'https://addons-dev.allizom.org'
variables = {'4mb_addon_slug': '4mb_addon_slug', 'addon_detail_guid': '{f2cd2fe0-0c62-40bd-8e28-2f4d7fc0ad43}', 'addon_detail_id':...dd-ons must comply with Mozilla’s Add-on Policies and are subject to manual review at any time after submission.', ...}

@pytest.mark.serial
@pytest.mark.nondestructive
@pytest.mark.create_session("rating_user")
def test_delete_rating(selenium, base_url, variables):
extension = variables["detail_extension_slug"]
selenium.get(f"{base_url}/addon/{extension}")
addon = Detail(selenium, base_url).wait_for_page_to_load()
# addon.login('rating_user')
addon.ratings.delete_rating_link.click()
> assert "rating" in addon.ratings.ratings_card_summary
E AssertionError: assert 'rating' in 'Are you sure you want to delete your review of Awesome Screenshot Plus - Capture, Annotate & More?'
E + where 'Are you sure you want to delete your review of Awesome Screenshot Plus - Capture, Annotate & More?' = <pages.desktop.frontend.details.Detail.Ratings object at 0x103e2a7d0>.ratings_card_summary
E + where <pages.desktop.frontend.details.Detail.Ratings object at 0x103e2a7d0> = <pages.desktop.frontend.details.Detail object at 0x103e29090>.ratings

tests/frontend/test_ratings.py:224: AssertionError
Failed tests/frontend/test_ratings.py::test_write_review_in_all_reviews_page[Desktop] 37.36
selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="c33623b3-0fdc-4cb4-9d4a-6fda979baecf")>, base_url = 'https://addons-dev.allizom.org'
variables = {'4mb_addon_slug': '4mb_addon_slug', 'addon_detail_guid': '{f2cd2fe0-0c62-40bd-8e28-2f4d7fc0ad43}', 'addon_detail_id':...dd-ons must comply with Mozilla’s Add-on Policies and are subject to manual review at any time after submission.', ...}

@pytest.mark.serial
@pytest.mark.nondestructive
@pytest.mark.create_session("rating_user")
def test_write_review_in_all_reviews_page(selenium, base_url, variables):
extension = variables["detail_extension_slug"]
selenium.get(f"{base_url}/addon/{extension}")
addon = Detail(selenium, base_url).wait_for_page_to_load()
# addon.login('rating_user')
# post a rating on the detail page
addon.ratings.rating_stars[4].click()
# waits for the rating to be properly recorded
> addon.ratings.wait_for_rating_form()

tests/frontend/test_ratings.py:420:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/desktop/frontend/details.py:1049: in wait_for_rating_form
self.wait.until(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selenium.webdriver.support.wait.WebDriverWait (session="c33623b3-0fdc-4cb4-9d4a-6fda979baecf")>, method = <function element_to_be_clickable.<locals>._predicate at 0x103d4c860>, message = ''

def until(self, method, message: str = ""):
"""Calls the method provided with the driver as an argument until the \
return value does not evaluate to ``False``.

:param method: callable(WebDriver)
:param message: optional message for :exc:`TimeoutException`
:returns: the result of the last call to `method`
:raises: :exc:`selenium.common.exceptions.TimeoutException` if timeout occurs
"""
screen = None
stacktrace = None

end_time = time.monotonic() + self._timeout
while True:
try:
value = method(self._driver)
if value:
return value
except self._ignored_exceptions as exc:
screen = getattr(exc, 'screen', None)
stacktrace = getattr(exc, 'stacktrace', None)
time.sleep(self._poll)
if time.monotonic() > end_time:
break
> raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message:
E Stacktrace:
E RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
E WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5
E NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:511:5
E dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:136:16

venv/lib/python3.11/site-packages/selenium/webdriver/support/wait.py:90: TimeoutException
Failed tests/frontend/test_ratings.py::test_edit_review_in_all_reviews_page[Desktop] 38.18
selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="febb61bc-2e32-470a-b6bd-c8995d2e8757")>, base_url = 'https://addons-dev.allizom.org'
variables = {'4mb_addon_slug': '4mb_addon_slug', 'addon_detail_guid': '{f2cd2fe0-0c62-40bd-8e28-2f4d7fc0ad43}', 'addon_detail_id':...dd-ons must comply with Mozilla’s Add-on Policies and are subject to manual review at any time after submission.', ...}

@pytest.mark.serial
@pytest.mark.nondestructive
@pytest.mark.create_session("rating_user")
def test_edit_review_in_all_reviews_page(selenium, base_url, variables):
extension = variables["detail_extension_slug"]
selenium.get(f"{base_url}/addon/{extension}")
addon = Detail(selenium, base_url).wait_for_page_to_load()
# addon.login('rating_user')
reviews = addon.ratings.click_all_reviews_link()
addon.ratings.edit_review.click()
# edit the previous rating in All reviews page and verify that the score is updated
reviews.edit_review_score[3].click()
assert len(reviews.selected_score_highlight) == 4
# update the written review text in All reviews page
edited_review_text = variables["edited_text_input"]
addon.ratings.clear_review_text_field()
addon.ratings.review_text_input(edited_review_text)
> addon.ratings.submit_review()

tests/frontend/test_ratings.py:451:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/desktop/frontend/details.py:1070: in submit_review
self.wait.until(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selenium.webdriver.support.wait.WebDriverWait (session="febb61bc-2e32-470a-b6bd-c8995d2e8757")>, method = <function element_to_be_clickable.<locals>._predicate at 0x103fefc40>, message = ''

def until(self, method, message: str = ""):
"""Calls the method provided with the driver as an argument until the \
return value does not evaluate to ``False``.

:param method: callable(WebDriver)
:param message: optional message for :exc:`TimeoutException`
:returns: the result of the last call to `method`
:raises: :exc:`selenium.common.exceptions.TimeoutException` if timeout occurs
"""
screen = None
stacktrace = None

end_time = time.monotonic() + self._timeout
while True:
try:
value = method(self._driver)
if value:
return value
except self._ignored_exceptions as exc:
screen = getattr(exc, 'screen', None)
stacktrace = getattr(exc, 'stacktrace', None)
time.sleep(self._poll)
if time.monotonic() > end_time:
break
> raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message:

venv/lib/python3.11/site-packages/selenium/webdriver/support/wait.py:90: TimeoutException
Failed tests/frontend/test_ratings.py::test_banned_words_in_user_reviews[Desktop-Multiple words ban] 77.21
selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="2f863a9f-c3bc-45e0-a381-a36b0c644e3b")>, base_url = 'https://addons-dev.allizom.org'
variables = {'4mb_addon_slug': '4mb_addon_slug', 'addon_detail_guid': '{f2cd2fe0-0c62-40bd-8e28-2f4d7fc0ad43}', 'addon_detail_id':...dd-ons must comply with Mozilla’s Add-on Policies and are subject to manual review at any time after submission.', ...}
denied_words = 'bad monkey lizard', error_message = 'The review text cannot contain any of the words: "bad", "lizard", "monkey"'

@pytest.mark.serial
@pytest.mark.nondestructive
@pytest.mark.parametrize(
"denied_words, error_message",
(
["bad", 'The review text cannot contain the word: "bad"'],
[
"bad monkey lizard",
'The review text cannot contain any of the words: "bad", "lizard", "monkey"',
],
),
ids=[
"Single word ban",
"Multiple words ban",
],
)
def test_banned_words_in_user_reviews(
selenium, base_url, variables, denied_words, error_message
):
extension = variables["theme_detail_page"]
selenium.get(f"{base_url}/addon/{extension}")
addon = Detail(selenium, base_url).wait_for_page_to_load()
> addon.login("rating_user")

tests/frontend/test_ratings.py:685:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/desktop/base.py:91: in login
fxa.account(user)
pages/desktop/frontend/login.py:101: in account
self.fxa_login(
pages/desktop/frontend/login.py:206: in fxa_login
self.wait.until(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selenium.webdriver.support.wait.WebDriverWait (session="2f863a9f-c3bc-45e0-a381-a36b0c644e3b")>, method = <function url_contains.<locals>._predicate at 0x103fee200>
message = 'AMO could not be loaded in https://accounts.stage.mozaws.net/signin_totp_code?showReactApp=true&deviceId=d680804aa9c7...e=offline&email=aschek%2Bqa-rating%40mozilla.com&hasLinkedAccount=false&hasPassword=true. Response status code was 200'

def until(self, method, message: str = ""):
"""Calls the method provided with the driver as an argument until the \
return value does not evaluate to ``False``.

:param method: callable(WebDriver)
:param message: optional message for :exc:`TimeoutException`
:returns: the result of the last call to `method`
:raises: :exc:`selenium.common.exceptions.TimeoutException` if timeout occurs
"""
screen = None
stacktrace = None

end_time = time.monotonic() + self._timeout
while True:
try:
value = method(self._driver)
if value:
return value
except self._ignored_exceptions as exc:
screen = getattr(exc, 'screen', None)
stacktrace = getattr(exc, 'stacktrace', None)
time.sleep(self._poll)
if time.monotonic() > end_time:
break
> raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message: AMO could not be loaded in https://accounts.stage.mozaws.net/signin_totp_code?showReactApp=true&deviceId=d680804aa9c74ac1a25cb56111f616e1&flowBeginTime=1725959086383&flowId=eff647922ec57b2341ac28a4d5b15ade3847b26fb26d8ab8587baf74c018e2e6&client_id=285dd6fd9907a74c&scope=profile%2Bopenid&state=87732e4a3e15d894c287720a8b0df7585aa3d0fae81f6bd418b7886e381b46fc%3AL2VuLVVTL2ZpcmVmb3gvYWRkb24vcmFpbmJvdy13b3JtLw&access_type=offline&email=aschek%2Bqa-rating%40mozilla.com&hasLinkedAccount=false&hasPassword=true. Response status code was 200

venv/lib/python3.11/site-packages/selenium/webdriver/support/wait.py:90: TimeoutException
------------------------------Captured stdout call------------------------------
The "click continue button" event occurred.
Failed tests/frontend/test_ratings.py::test_restricted_user_rating_submission[Desktop] 41.67
selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="242198c0-6d4c-4568-a465-efc971106842")>, base_url = 'https://addons-dev.allizom.org'
variables = {'4mb_addon_slug': '4mb_addon_slug', 'addon_detail_guid': '{f2cd2fe0-0c62-40bd-8e28-2f4d7fc0ad43}', 'addon_detail_id':...dd-ons must comply with Mozilla’s Add-on Policies and are subject to manual review at any time after submission.', ...}

@pytest.mark.serial
def test_restricted_user_rating_submission(selenium, base_url, variables):
"""Verify that a restricted user email is not allowed to post addon ratings"""
extension = variables["theme_detail_page"]
selenium.get(f"{base_url}/addon/{extension}")
addon = Detail(selenium, base_url).wait_for_page_to_load()
> addon.login("restricted_user")

tests/frontend/test_ratings.py:705:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/desktop/base.py:91: in login
fxa.account(user)
pages/desktop/frontend/login.py:146: in account
self.fxa_login(
pages/desktop/frontend/login.py:206: in fxa_login
self.wait.until(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selenium.webdriver.support.wait.WebDriverWait (session="242198c0-6d4c-4568-a465-efc971106842")>, method = <function url_contains.<locals>._predicate at 0x1044aed40>
message = 'AMO could not be loaded in https://accounts.stage.mozaws.net/oauth/signin?showReactApp=true&deviceId=3a88702a7d0a4c46...ine&email=user-email-restrictions%40restmail.net&hasLinkedAccount=false&hasPassword=true. Response status code was 200'

def until(self, method, message: str = ""):
"""Calls the method provided with the driver as an argument until the \
return value does not evaluate to ``False``.

:param method: callable(WebDriver)
:param message: optional message for :exc:`TimeoutException`
:returns: the result of the last call to `method`
:raises: :exc:`selenium.common.exceptions.TimeoutException` if timeout occurs
"""
screen = None
stacktrace = None

end_time = time.monotonic() + self._timeout
while True:
try:
value = method(self._driver)
if value:
return value
except self._ignored_exceptions as exc:
screen = getattr(exc, 'screen', None)
stacktrace = getattr(exc, 'stacktrace', None)
time.sleep(self._poll)
if time.monotonic() > end_time:
break
> raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message: AMO could not be loaded in https://accounts.stage.mozaws.net/oauth/signin?showReactApp=true&deviceId=3a88702a7d0a4c46adc02d64cb27dddf&flowBeginTime=1725959163962&flowId=e0565b71b10f4ce75f1afa8707927c4977618831aa059d30854799fc574f948e&client_id=285dd6fd9907a74c&scope=profile%2Bopenid&state=3ad661295aa8c73c5dbf3e5c8da80e32034d68e3407b6e29400abc2cfdc7659d%3AL2VuLVVTL2ZpcmVmb3gvYWRkb24vcmFpbmJvdy13b3JtLw&access_type=offline&email=user-email-restrictions%40restmail.net&hasLinkedAccount=false&hasPassword=true. Response status code was 200

venv/lib/python3.11/site-packages/selenium/webdriver/support/wait.py:90: TimeoutException
------------------------------Captured stdout call------------------------------
The "click continue button" event occurred.
Passed tests/frontend/test_ratings.py::test_throttled_request_create_rating_spam[Desktop] 24.02
------------------------------Captured stdout call------------------------------
The "click continue button" event occurred.
Passed tests/frontend/test_ratings.py::test_rating_with_text_tc_id_c94034[Desktop] 51.90
-----------------------------Captured stdout setup------------------------------
The "click continue button" event occurred.
Passed tests/frontend/test_ratings.py::test_user_review_permalink_tc_id_c1494903[Desktop] 7.79
No log output captured.
Passed tests/frontend/test_ratings.py::test_edit_review_tc_id_c94035[Desktop] 7.92
No log output captured.
Passed tests/frontend/test_ratings.py::test_cancel_edit_review[Desktop] 7.36
No log output captured.
Passed tests/frontend/test_ratings.py::test_cancel_delete_review[Desktop] 7.97
No log output captured.
Passed tests/frontend/test_ratings.py::test_edit_star_rating[Desktop] 8.90
No log output captured.
Passed tests/frontend/test_ratings.py::test_link_to_all_reviews[Desktop] 7.13
No log output captured.
Passed tests/frontend/test_ratings.py::test_all_reviews_page_items[Desktop] 7.04
No log output captured.
Passed tests/frontend/test_ratings.py::test_filter_reviews_by_score[Desktop] 11.46
No log output captured.
Passed tests/frontend/test_ratings.py::test_filter_reviews_from_rating_bars[Desktop] 7.49
No log output captured.
Passed tests/frontend/test_ratings.py::test_flag_review_action_tc_id_c1494904[Desktop] 8.65
No log output captured.
Passed tests/frontend/test_ratings.py::test_flag_missing_for_empty_review_tc_id_c1494904[Desktop] 6.29
No log output captured.
Passed tests/frontend/test_ratings.py::test_flag_review_menu_options_tc_id_c1494904[Desktop] 9.03
No log output captured.
Passed tests/frontend/test_ratings.py::test_click_on_review_posting_time_link[Desktop] 7.23
No log output captured.
Passed tests/frontend/test_ratings.py::test_delete_review_in_all_reviews_page[Desktop] 9.30
No log output captured.
Passed tests/frontend/test_ratings.py::test_developer_reply_to_review[Desktop] 51.85
-----------------------------Captured stdout setup------------------------------
The "click continue button" event occurred.
Passed tests/frontend/test_ratings.py::test_edit_developer_reply_to_review[Desktop] 8.21
No log output captured.
Passed tests/frontend/test_ratings.py::test_delete_developer_reply_to_review[Desktop] 8.10
No log output captured.
Passed tests/frontend/test_ratings.py::test_developers_cannot_rate_their_own_addons[Desktop] 7.63
No log output captured.
Passed tests/frontend/test_ratings.py::test_rating_card_loaded_correctly[Desktop] 5.91
No log output captured.
Passed tests/frontend/test_ratings.py::test_rating_card_addon_name[Desktop] 5.83
No log output captured.
Passed tests/frontend/test_ratings.py::test_rating_card_authors[Desktop] 7.30
No log output captured.
Passed tests/frontend/test_ratings.py::test_rating_card_filled_stars[Desktop] 9.11
No log output captured.
Passed tests/frontend/test_ratings.py::test_rating_card_rating_bars[Desktop] 7.48
No log output captured.
Passed tests/frontend/test_ratings.py::test_rating_card_bar_review_counter[Desktop] 7.28
No log output captured.
Passed tests/frontend/test_ratings.py::test_rating_card_average_stars[Desktop] 5.69
No log output captured.
Passed tests/frontend/test_ratings.py::test_banned_words_in_user_reviews[Desktop-Single word ban] 51.32
------------------------------Captured stdout call------------------------------
The "click continue button" event occurred.